<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>专业列表</title>
    <link href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css"><link rel="stylesheet" href="../css/adminStyle.css" type="text/css" />
  </head>
  
  <body>
  <table>
  	<tr>
  		<td class="tdbottom">
  			<a href="<%=basePath%>admin/collegeService.do?method=addCollege">添加学院</a>
  		</td>
  	</tr>
  	<tr>
    	<td class="tdbottom">
    		共${collegeCount}条记录，每页${listNumber}条
    	</td>
    </tr>
  	<tr>
  		<td>
  			  <table width="750" align="center" border="1" cellSpacing="0" cellPadding="0">
  	<tr class="tdhead">
  		<td>学院名称</td>
  		<td>操作</td>
	</tr>
    <c:forEach items="${collegeList}" var="college" >
    	<tr >
    		<td class="tdcontent">
    			<a href="<%=basePath %>admin/departmentService.do?method=listDepartment&collegeId=${college.id}">
    				<c:out value="${college.name}"/>
    			</a>
    			
    		</td>
    		<td class="tdcontent">
    			<a href="<%=basePath%>admin/collegeService.do?method=showCollege&collegeId=${college.id}">编辑</a> | <a href="<%=basePath%>admin/collegeService.do?method=deleteCollege&collegeId=${college.id}">删除</a>
    		</td>
    	
    	</tr>
    </c:forEach>
    <tr>
    	<td colspan="2" class="tdbottom" align="center">
    		<c:if test="${page!=1}">
    			<a href="<%=basePath%>admin/collegeService.do?method=listCollege&page=1">首页</a>
    			<a href="<%=basePath%>admin/collegeService.do?method=listCollege&page=${page-1}">上一页</a>
    		</c:if>
    		<c:if test="${page==1}">
    			首页 上一页
    		</c:if>
    		第<c:out value="${page}"/>/<c:out value="${pageCount}"/>页
    		<c:if test="${page!=pageCount}">
	    		<a href="<%=basePath%>admin/collegeService.do?method=listCollege&page=${page+1}">下一页</a> 
	    		<a href="<%=basePath%>admin/collegeService.do?method=listCollege&page=${pageCount}">尾页</a>
    		</c:if>
    		<c:if test="${page==pageCount}">
    			下一页 尾页
    		</c:if>
    		
    	</td>
    </tr>
  </table>
	  </td>
  	</tr>
  </table>
  

  </body>
</html>
